

import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs';
import { ApiResponse } from '../interfaces/api.response';

@Injectable({ providedIn: 'root' })
export class MenuApi {

    constructor(private http: HttpClient) {

    }

    /**
     * 获得某应用下的所有菜单数据
     * @param applicationId 
     * @param hospId 
     * @param tenantId 
     * @returns 
     */
    getApplicationMenus(applicationId: string, hospId: string, tenantId: string): Observable<ApiResponse> {
        let url = `/api/a0/sys/hrp-sys-menu/selectAll`
        return this.http.get<ApiResponse>(url, {
            params: {
                applicationId,
                hospId,
                tenantId
            }
        });
    }

}